﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace VideoWorld
{
    public class RegisterSuccess : System.Web.UI.Page
    {

        private String name = String.Empty;
        protected System.Web.UI.WebControls.Button btUserInfo;
        protected System.Web.UI.WebControls.Button btCharge;
        protected System.Web.UI.WebControls.Button btIndex;
        public String info = String.Empty;

        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                name = Session["userName"] as String;
                if (name == null)
                {
                    Page.Response.Redirect("login.aspx");
                }
                else
                {
                    info = String.Format("恭喜你，帐号{0}注册成功，请查收邮箱<br><br><font color=red>请点击\"充值中心\"按钮进行充值享受完整服务</font>", name);
                }
            }
        }

        #region Web Form Designer generated code
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);
        }

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.btUserInfo.Click += new System.EventHandler(this.btUserInfo_Click);
            this.btCharge.Click += new System.EventHandler(this.btCharge_Click);
            this.btIndex.Click += new System.EventHandler(this.btIndex_Click);
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion

        private void btUserInfo_Click(object sender, System.EventArgs e)
        {
            String urlPath = String.Format("UserInfo.aspx");
            Page.Response.Redirect(urlPath);
        }

        private void btCharge_Click(object sender, System.EventArgs e)
        {
            String urlPath = String.Format("ChargeCard.aspx");
            Page.Response.Redirect(urlPath);
        }

        private void btIndex_Click(object sender, System.EventArgs e)
        {
            String urlPath = String.Format("index.aspx");
            Page.Response.Redirect(urlPath);
        }
    }
}

